//
//  CrashModel.h
//  flutter
//
//  Created by GilesZhou on 2020/6/28.
//  Copyright © 2020 Ganee. All rights reserved.
//

#import <Foundation/Foundation.h>

NS_ASSUME_NONNULL_BEGIN

#pragma mark --- 设备model
@interface CrashPhoneModel : NSObject

/// 设备id
@property (nonatomic, copy) NSString *deviceId;
/// 设备机型（iphone 6s, HuaWei mate 30 ...）
@property (nonatomic, copy) NSString *deviceType;
/// 客户端类型（iOS or Android）
@property (nonatomic, copy) NSString *clientType;
/// 系统型号（iOS 13.1, Android 8.1）
@property (nonatomic, copy) NSString *clientNumber;
/// 应用版本号（V 1.23.0）
@property (nonatomic, copy) NSString *appVersion;
/// 网络类型（WIFI/4G...）
@property (nonatomic, copy) NSString *networkStatus;

@end



#pragma mark --- 崩溃信息model
@interface CrashMethodModel : NSObject
/// 类名  (页面名，controller or activity)
@property (nonatomic, copy) NSString *entityName;
/// 方法名
@property (nonatomic, copy) NSString *methodName;
@end

@interface CrashRequestModel : NSObject
/// 域名
@property (nonatomic, copy) NSString *host;
/// 接口
@property (nonatomic, copy) NSString *api;
/// 请求头
@property (nonatomic, copy) NSString *header;
/// 参数
@property (nonatomic, copy) NSString *parameters;
/// 请求响应
@property (nonatomic, copy) NSString *response;
/// 请求时间
@property (nonatomic, copy) NSString *date;
/// 请求id
@property (nonatomic, copy) NSString *requestId;

@end

@interface CrashUserModel : NSObject
/// 员工id
@property (nonatomic, copy) NSString *employeeId;
/// 公司id
@property (nonatomic, copy) NSString *companyId;
/// 用户名
@property (nonatomic, copy) NSString *userName;

@end

@interface CrashFuncModel : NSObject
/// 发生时间
@property (nonatomic, copy) NSString *happenDate;
/// 问题描述
@property (nonatomic, copy) NSString *questionDesc;
/// 附件（图片）
@property (nonatomic, strong) NSArray *attachments;
/// 错误类型（CRASH/EXCEPTION/ANR）
@property (nonatomic, copy) NSString *errorType;
/// 其他信息（可能来自第三方分析的错误原因）
@property (nonatomic, copy) NSString *extraInfo;
/// 方法信息
@property (nonatomic, strong) CrashMethodModel *scene;
/// 请求信息
@property (nonatomic, strong) CrashRequestModel *request;
/// 用户信息
@property (nonatomic, strong) CrashUserModel *userInfo;

@end


#pragma mark - 崩溃最外层信息
@interface CrashModel : NSObject

/// 唯一标识
@property (nonatomic, copy) NSString *crashID;
/// 手机型号信息
@property (nonatomic, strong) CrashPhoneModel *staticData;
/// 崩溃信息
@property (nonatomic, strong) CrashFuncModel *functionData;

@end

NS_ASSUME_NONNULL_END
